package com.cg.design.graphicdesignpattern.bridge;

/**
 * 类的功能层次结构：IncreaseDisplay类，表示逐渐增加显示次数的“功能上”的类
 *
 * @program: LeetCode->IncreaseDisplay
 * @description: 类的功能层次结构：IncreaseDisplay类，表示逐渐增加显示次数的“功能上”的类
 * @author: cg
 * @create: 2022-03-24 00:24
 **/
public class IncreaseDisplay extends CountDisplay {

    /**
     * 递增步长
     */
    private int step;

    public IncreaseDisplay(DisplayImpl display, int step) {
        super(display);
        this.step = step;
    }

    public void increaseDisplay(int level) {
        int count = 0;
        for (int i = 0; i < level; i++) {
            multiDisplay(count);
            count += step;
        }
    }

}
